<template>
  <div style="margin: 60px auto; display: flex; width: 200px;">
    <input v-model="inputText" placeholder="请输入内容" />
    <button @click="copyToClipboard">确定</button>
  </div>
  表

</template>

<script setup>
import { ref, reactive, onMounted } from "vue";
import CustomCard from "@/components/card/CustomCard.vue";
import headerHome from "@/components/general/HeaderHome.vue";



// 定义一个响应式变量来存储输入框的内容
const inputText = ref('');

// 定义一个方法来复制文本到剪贴板
const copyToClipboard = async () => {
  let text = `${inputText.value}旅游;${inputText.value}旅行;${inputText.value}游`
  await navigator.clipboard.writeText(text);
  inputText.value = '';
  let num = Math.floor(Math.random() * 100);
  let title = num >= 60 ? `${num}分,欧气爆棚` : `${num}分,非酋`;
  console.log(title)
};



</script>

<style scoped lang="scss">
@import url('@/css/home/home.scss');
</style>
